%% Expression demonstration test.
%%
-include_lib("ect/include/ect.hrl").

-class(expr1).
?FIELDS(1, public, {a, b, c}).
-export([dotest/0]).


dotest() ->
    X0 = #expr1{a = "p", b = 1, c = 2}, %% init 
    X = X0#expr1{b = "as", c = "s"},  %% set variables
    #expr1{a = A, c = C} = X,        %% extract variables
    #expr1{b = B} = X,               %% extract variables
    list_to_atom(A++B++C).
